from src.insertAttendance import insert_single_row_and_get_id
from tools.db_utils import db_operation

SQL_插入班级 = "INSERT INTO clazz (id, name) VALUES (%(id)s,%(name)s)"
SQL_统计班级数量查询 = "SELECT COUNT(*) FROM clazz"

def insertClazz(clazz_data):
    for row in clazz_data:
        row['id'] = row['A']
        row['name'] = row['B']
        insert_single_row_and_get_id(SQL_插入班级,**row)

    return SQL_统计班级数量查询
